package com.orange.cetback.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

@Getter
@AllArgsConstructor
public enum WordLearningStage {
    ALL(0, "ALL"),
    UN_LEARNING(1, "UN_LEARNING"),
    REVIEW(2, "REVIEW"),
    REVIEW_DONE(3, "REVIEW_DONE");

    private final Integer code;
    private final String stageName;


    public static String getStageName(Integer code) {
        return Arrays.stream(values())
                .filter(stage -> stage.code.equals(code))
                .findFirst()
                .orElse(ALL)
                .getStageName();
    }
}
